@extends('templates.generalstructure')

@section('contenido')
<div class="wrapper-admin">

	<nav class="navbar navbar-inverse">
		<div class="navbar-header">
			<a class="navbar-brand" href="{{ URL::route('admin.users.index') }}">Usuarios</a>
		</div>
		<ul class="nav navbar-nav">
			<li><a href="{{ URL::route('admin.users.index') }}">Ver Todos</a></li>
			<li><a href="{{ URL::route('admin.users.create') }}">Crear Usuarios</a>
		</ul>
	</nav>
	
	<h1>Crear Usuario</h1>
	
	<!-- if there are creation errors, they will show here -->
	{{ HTML::ul($errors->all()) }}
	
	{{ Form::open(array('url' => URL::route('admin.users.store'))) }}
	
		<div class="form-group">
			{{ Form::label('username', 'Username') }}
			{{ Form::text('username', Input::old('username'), array('class' => 'form-control')) }}
		</div>
	
		<div class="form-group">
			{{ Form::label('email', 'Email') }}
			{{ Form::email('email', Input::old('email'), array('class' => 'form-control')) }}
		</div>
		<div class="form-group">
			{{ Form::label('password', 'Password') }}
			{{ Form::password('password', array('class' => 'form-control ')) }}
		</div>
		<div class="form-group">
			{{ Form::label('roles', 'Roles') }}
			{{ Form::select('roles',Rol::all()->lists('nombre','id'), Input::old('roles'), array('class' => 'form-control','name'=>'roles[]','multiple')) }}
		</div>
		{{ Form::submit('Guardar', array('class' => 'btn btn-primary')) }}
	
	{{ Form::close() }}

</div>

@stop
